org 0x7c00
[bits 16]
xor ax, ax ; eax=0
; init 初始化段寄存器，段地址全部设为0
mov ds, ax
mov ss, ax
mov es, ax
mov fs, ax
mov gs, ax

; init 初始化栈指针,显存地址
mov sp, 0x7c00
mov ax, 0xb800
mov gs, ax

; 控制输出 12*80+12=972 0x3cc
mov ah, 0x5b ; 背景红 字体青色
mov al, '2'
mov [gs:2*(0x3cc+0)], ax
mov al, '2'
mov [gs:2*(0x3cc+1)], ax
mov al, '3'
mov [gs:2*(0x3cc+2)], ax
mov al, '3'
mov [gs:2*(0x3cc+3)], ax

mov al, '6'
mov [gs:2*(0x3cc+4)], ax
mov al, '2'
mov [gs:2*(0x3cc+5)], ax
mov al, '7'
mov [gs:2*(0x3cc+6)], ax
mov al, '1'
mov [gs:2*(0x3cc+7)], ax

mov al, 'y'
mov [gs:2*(0x3cc+8)], ax
mov al, 's'
mov [gs:2*(0x3cc+9)], ax
mov al, 'j'
mov [gs:2*(0x3cc+10)], ax

jmp $ ; 死循环

times 510 - ($ - $$) db 0  ; 填充字符0-510
db 0x55, 0xaa ; 表示mbr ，否则qemu error no bootable device
